<?php
// //获取域名或主机地址 
// echo $_SERVER['HTTP_HOST']."<br>"; #localhost
// //获取网页地址 
// echo $_SERVER['PHP_SELF']."<br>"; #/blog/testurl.php
// //获取网址参数 
// echo $_SERVER["QUERY_STRING"]."<br>"; #id=5

// echo $_SERVER["QUERY_STRING"]."<br>";

$case=$_SERVER["QUERY_STRING"];
$case=$case.'';
// 
//判断重定向;
if($_SERVER['PHP_SELF']=='/show.php'){
    header('HTTP/1.1 301 Moved Permanently');
    switch($case){
        case 'contentid=2':
            header('Location:http://'.$_SERVER['HTTP_HOST'].'/Industries/Food.html');
            break;
        case 'contentid=3':
            header('Location:http://'.$_SERVER['HTTP_HOST'].'/Industries/Glass.html');
            break;
        case 'contentid=4':
            header('Location:http://'.$_SERVER['HTTP_HOST'].'/Industries/Metal.html');
            break;
        case 'contentid=5':
            header('Location:http://'.$_SERVER['HTTP_HOST'].'/Industries/Paper-and-card.html');
            break;
        case 'contentid=6':
            header('Location:http://'.$_SERVER['HTTP_HOST'].'/Industries/Plastic.html');
            break;
        case 'contentid=7':
            header('Location:http://'.$_SERVER['HTTP_HOST'].'/Industries/Rubber.html');
            break;
        case 'contentid=54':
            header('Location:http://'.$_SERVER['HTTP_HOST'].'/Technology/TIJ.html');
            break;
        case 'contentid=55':
            header('Location:http://'.$_SERVER['HTTP_HOST'].'/Technology/CIJ.html');
            break;
        case 'contentid=56':
            header('Location:http://'.$_SERVER['HTTP_HOST'].'/About/Event.html');
            break;
        case 'contentid=64':
            header('Location:http://'.$_SERVER['HTTP_HOST'].'/News/1.html');
            break;
        case 'contentid=67':
            header('Location:http://'.$_SERVER['HTTP_HOST'].'/Technology/Pneumatic-marking-machine.html');
            break;
        case 'contentid=68':
            header('Location:http://'.$_SERVER['HTTP_HOST'].'/Products/Continuous-Inkjet-Printer/A300.html');
            break;
        case 'contentid=69':
            header('Location:http://'.$_SERVER['HTTP_HOST'].'/Products/Continuous-Inkjet-Printer/A400.html');
            break;
        case 'contentid=89':
            header('Location:http://'.$_SERVER['HTTP_HOST'].'/Products/Pneumatic-Coder/SP2000.html');
            break;
        default:
            header('Location:http://'.$_SERVER['HTTP_HOST'].'/Products.html');
    }
}